local nianxieji_skill = fk.CreateSkill {

  name = "#nianxieji_skill",
  attached_equip = "nianxieji",

  tags = {  },

}



nianxieji_skill:addEffect(fk.Damage, {
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(nianxieji_skill.name) and data.card and data.card.trueName == "slash" and
        not data.to:isKongcheng()
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local to = data.to
    local target_cards = table.filter(to:getCardIds("h"), function(cid)
      return Fk:getCardById(cid):getMark("@@thb_mingpai") == 0
    end)
    if #target_cards == 0 then
      return false
    end
    local showCard = table.random(target_cards, math.min(#target_cards, 2))
    for _, c in ipairs(showCard) do
      room:addCardMark(Fk:getCardById(c), "@@thb_mingpai")
    end
  end
})

return nianxieji_skill